<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<div id="host"></div>
<script>
description('Tests that setting an attribute in Shadow DOM does not cause a crash.');

var host = document.querySelector('#host');
var root = host.attachShadow({mode: 'open'});
root.innerHTML = '<div></div>';
var elem = root.firstChild;
elem.id = 'bar';
var attr = elem.attributes.item(0);
attr.value = 'bar';
var doc2 = document.implementation.createHTMLDocument('Doc 2');
doc2.adoptNode(attr);

successfullyParsed = true;
</script>
